package com.ted.hole2.repository;

import java.util.List;

import com.ted.hole2.config.HibernateConfig;
import com.ted.hole2.config.HoleService.Page;
import com.ted.hole2.config.HoleService.ServiceRepository;
import com.ted.hole2.model.User;

/**
 * 用户查询服务
 * 
 * @author Zhang Kangkang
 */
public interface UserRepository extends ServiceRepository<User, Long> {

    public static UserRepository get() throws InstantiationException, IllegalAccessException {
        return HibernateConfig.getService(User.class, UserRepository.class);
    }

    public List<User> findByName(Long id);

    public User findByNickname(String nickname);

    public Page<User> findPage(Page<User> page, User condition);

}
